package com.finalministry.server;

import java.io.IOException;
import java.sql.SQLException;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.finalministry.database.dao.DaoFactory;

import com.vividsolutions.jts.io.ParseException;

@Path("/congregation")
public class ServiceCongregation extends IndexBase {

	@Path("/all")
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public Response getAll() throws IOException, SQLException, ClassNotFoundException, ParseException {

		return Response.ok(DaoFactory.getInstance().getCongregationDAO().getAll()).build();
	}
}